<%@ page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>客户信息</title>
<%@ include file="/common/meta.jsp"%>
<%@ include file="/common/import.jsp"%>


<script type="text/javascript">
var url="${ctx}/crm/type/save.action";
$(function(){
	$('#myForm').form({
			    url:url,
			    onSubmit:function(){
			    	return $(this).form('validate');
			    },
			     success:function(data){
				 	 var oTxt = jQuery.parseJSON(data);
				     var message = oTxt.msg;	
					 var sucessflag = oTxt.flag;
					 if(sucessflag=='T') {
						 $.messager.alert('提示',message, 'info',function(){
								   cancel();
						          window.parent.reload();
								});
					 }else{
						$.messager.alert('提交结果', message, 'error');
					 }      
				 }
		   });
      });

function doSubmit(){//提交按钮
	
     if($("#myForm").form('validate')){
    	 $('#myForm').submit();
     }
}

  //取消
 function cancel(){
	window.parent.closeWin();
 }
</script>
</head>
<body>
	<div style="padding:0px;background:#fff;border:0px;">

		<form id="myForm" name="myForm" method="post">
			<input type="hidden" name="id" value="" /> <input type="hidden"
				name="customerTypeId" id="customerTypeId" value="${item.customerTypeId }" /> 
			<input type="hidden" name="id" value="" /> <input type="hidden"
				name="customerTypeParentId" id="customerTypeParentId" value="${customerTypeParentId }" />
			<br />
			<table align="center" class=info cellspacing=1 cellpadding=0
				style="margin-top:0px;">
				<tr>
					<th width="80">类别代码 </th>
					<td><input type="text" class="easyui-validatebox" id="customerTypeCode"  name="customerTypeCode" size="30" value="${item.customerTypeCode}"/></td>
				</tr>
				<tr>
					<th >类别名称 </th>
					<td><input type="text" class="easyui-validatebox" id="customerTypeName"  name="customerTypeName" size="30" value="${item.customerTypeName}"/></td>
				</tr>
<!-- 				<tr> -->
<!-- 					<th >父级代码 </th> -->
<!-- 					<td><input type="text" class="easyui-validatebox" id="customerTypeParentCode"  name="customerTypeParentCode" size="30" value="${item.customerTypeParentCode}"/></td> -->
<!-- 				</tr> -->
<!-- 				<tr> -->
<!-- 					<th>所在层级 </th> -->
<!-- 					<td><input type="text" class="easyui-validatebox" id="customerTypeLevel"  name="customerTypeLevel" size="30" value="${item.customerTypeLevel}"/></td> -->
<!-- 				</tr> -->
			</table>
			<center>
				<a class="easyui-linkbutton" id="saveYes" iconCls="icon-add"
					onClick="doSubmit();">保存</a>
			</center>

		</form>
	</div>

</body>
</html>
